Professional C++ by Marc Gregoire; Nicholas A. Solter; Scott J. Kleper
Author:Marc Gregoire; Nicholas A. Solter; Scott J. Kleper
Language: eng
Format: mobi
Tags: Reference
ISBN: 9780470932445
Publisher: Wrox
Published: 2011-10-04T00:00:00+00:00
regex_search()
The regex_match() algorithm discussed in the previous section returns true if the entire source string matches the regular expression, false otherwise. It cannot be used to find a matching sub-string in the source string. The regex_search() algorithm allows you to search for a sub-string that matches a certain pattern in a source string. There are six versions of the regex_search() algorithm. The difference between them is in the type of arguments, similar to the six versions of regex_match(). See the Standard Library Reference resource on the website for more details.
One of the versions of the regex_search() algorithm accepts a begin and end iterator into a string that you want to process. You might be tempted to use this version of regex_search() in a loop to find all occurrences of a pattern in a source string by manipulating these begin and end iterators for each regex_search() call. Never do this! It can cause problems when your regular expression uses anchors (^ or $), word boundaries, and so on. It can also cause an infinite loop due to empty matches. Use the regex_iterator or regex_token_iterator as explained later in this chapter to extract all occurrences of a pattern from a source string.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12607)
Hello! Python by Anthony Briggs(9929)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9805)
The Mikado Method by Ola Ellnestam Daniel Brolund(9796)
Dependency Injection in .NET by Mark Seemann(9351)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8316)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7774)
Grails in Action by Glen Smith Peter Ledbrook(7707)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7571)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7235)
Microservices with Go by Alexander Shuiskov(6998)
Practical Design Patterns for Java Developers by Miroslav Wengner(6907)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6864)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6429)
Angular Projects - Third Edition by Aristeidis Bampakos(6276)
The Art of Crafting User Stories by The Art of Crafting User Stories(5794)
NetSuite for Consultants - Second Edition by Peter Ries(5722)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5542)
Kotlin in Action by Dmitry Jemerov(5077)
